namespace MalRec.Base.ExceptionHandling
{
    public class ExceptionPolicy
    {
        #region private members

        #endregion private members

        #region public members

        /// <summary>
        /// Gets the policy name
        /// </summary>
        public string Name
        {
            get;
            private set;
        }

        /// <summary>
        /// Gets the policy description
        /// </summary>
        public string Description
        {
            get;
            private set;
        }

        /// <summary>
        /// Sets flag if the exception should be rethrowed
        /// </summary>
        public bool Rethrow
        {
            private set;
            get;
        }

        /// <summary>
        /// Sets the propagation, defined by <see cref="ExceptionHelper.Propagate"/>
        /// </summary>
        public int Propagation
        {
            private set;
            get;
        }

        #endregion public members

        #region constructors

        /// <summary>
        /// Creates and initializes a <see cref="ExceptionPolicy"/> object
        /// </summary>
        /// <param name="name">the policy name</param>
        /// <param name="propagation">the policy description</param>
        /// <param name="description">the policy propagation</param>
        /// <param name="rethrow">the policy rethrow</param>
        public ExceptionPolicy(string name, string description, int propagation, bool rethrow)
        {
            Name = name;
            Rethrow = rethrow;
            Propagation = propagation;
            Description = description;
        }

        #endregion constructors

        #region private methods

        #endregion private methods

        #region protected methods

        #endregion protected methods

        #region public methods

        #endregion public methods
    }
}